// 定义路由表
// 所有的模块化规范都有一个共同点: 如果引入文件时,这个文件的文件名叫做index.则引入的路径只需要写到文件所处的文件夹即可.因为模块化规范中会自动找当前文件夹中的index.js
import Home from './pages/Home'
import About from './pages/About'
import News from './pages/News'
import Message from './pages/Message'
import Detail from './pages/Detail'

export default [
  {
    path: '/',
    element: <Home></Home>,
    children: [
      {
        path: '/news',
        element: <News></News>,
      },
      {
        path: '/message',
        element: <Message></Message>,
        children: [
          {
            path: '/message/detail',
            children: [
              {
                path: '/message/detail/:id',
                element: <Detail></Detail>,
              },
              {
                path: '/message/detail',
                element: <Detail></Detail>,
              },
            ],
          },
        ],
      },
    ],
  },
  {
    path: '/about',
    element: <About></About>,
  },
]
